;5、写一个程序，滤去某个字符串中的空格符号（ASSCII码20h），字符串0结尾

;双指针
assume cs:code, ds:data

data segment 

string db "hello world", 0
outstring db 20 dup(?)

data ends


code segment

start:
		mov ax, data
		mov ds, ax
		mov ax, offset string
		mov si, ax
		sub si, 1
		mov ax, offset outstring
		mov di, ax
	;
judge:
		inc si
		cmp byte ptr[si], 0
		jz deal
		cmp byte ptr[si], 20h
		jz judge
		mov al, [si]
		mov [di], al
		inc di
		jmp judge
		
deal:
		mov byte ptr [di], 0h
	
				
exit:
		mov ax, 4c00h
		int 21h

code ends
	end start